<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>后台管理系统</title>

    <!-- Bootstrap CSS -->
    <link href="/static/vendor/bootstrap/bootstrap.min.css" rel="stylesheet">
        <!-- Bootstrap-Table CSS -->
        <link href="/static/vendor/bootstrap-table/bootstrap-table.min.css" rel="stylesheet">
    
        <link rel="stylesheet" href="/static/vendor/bootstrap/bootstrap-icons.css">
        
    <style>
        :root {
            --sidebar-width: 240px;
            --primary-color: #2c3e50;
            --secondary-color: #3498db;
        }
    
        body {
            font-family: 'Helvetica Neue', Arial, sans-serif;
            background-color: #f8f9fa;
            margin: 0;
            padding: 0;
            height: 100vh;
            overflow: hidden;
        }
    
        /* 导航栏美化 */
        .navbar {
            box-shadow: 0 2px 4px rgba(0,0,0,.1);
            background: var(--primary-color) !important;
        }
        .navbar-brand {
            font-weight: 600;
            letter-spacing: 1px;
        }
    
        /* 侧边栏美化 */
        .sidebar {
            background: white;
            border-right: 1px solid #eee;
            height: calc(100vh - 56px);
            padding: 1rem 0;
            box-shadow: 2px 0 8px rgba(0,0,0,.05);
        }
        .list-group-item {
            border: none;
            border-radius: 0;
            font-weight: 500;
            color: #666;
            transition: all .2s;
            cursor: pointer;
        }
        .list-group-item.active {
            background: var(--secondary-color);
            border-color: transparent;
            position: relative;
            color: white;
        }
        .list-group-item.active:after {
            content: '';
            position: absolute;
            right: 0;
            top: 50%;
            transform: translateY(-50%);
            width: 3px;
            height: 60%;
            background: var(--primary-color);
        }
    
        /* 主要内容区域 */
        .main-content {
            padding: 0;
            height: calc(100vh - 56px);
        }
        
        iframe {
            width: 100%;
            height: 100%;
            border: none;
        }
            /* 设置按钮样式 */
            .settings-btn {
                position: fixed;
                bottom: 30px;
                right: 30px;
                width: 50px;
                height: 50px;
                border-radius: 50%;
                background-color: var(--primary-color);
                color: white;
                display: flex;
                align-items: center;
                justify-content: center;
                cursor: pointer;
                box-shadow: 0 2px 10px rgba(0,0,0,0.2);
                z-index: 1000;
                transition: all 0.3s;
            }
            
            .settings-btn:hover {
                background-color: var(--secondary-color);
                transform: scale(1.1);
            }
            
            /* 设置弹窗样式 */
            .settings-modal .form-check {
                margin: 10px 0;
            }
            
            .settings-modal .form-check-label {
                margin-left: 8px;
            }
        @media (max-width: 768px) {
            .sidebar {
                height: auto;
                border-right: none;
                border-bottom: 1px solid #eee;
            }
        }
    </style>
</head>
<body>

    <!-- 导航栏 -->
    <nav class="navbar navbar-expand-lg navbar-dark bg-dark">
        <div class="container-fluid">
            <a class="navbar-brand" href="#">后台管理系统</a>
            <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarNav">
                <span class="navbar-toggler-icon"></span>
            </button>
        </div>
    </nav>

    <div class="container-fluid h-100 " >
        <div class="row h-100">
            <!-- 侧边栏 -->
            <div class="col-md-3 col-lg-2 bg-light sidebar collapse show" id="navbarNav">
                <div class="list-group">
                    <a href="#" class="list-group-item list-group-item-action active" 
                       onclick="loadPage('pages/predict.html')">预测后连续</a>
                    <a href="#" class="list-group-item list-group-item-action" 
                       onclick="loadPage('pages/predconn.html')">批量预测后连续</a>
                    <a href="#" class="list-group-item list-group-item-action" 
                       onclick="loadPage('pages/predconn.html?page=1')">批量预测后连续2</a>
                    <a href="#" class="list-group-item list-group-item-action" 
                       onclick="loadPage('pages/predconn.html?page=2')">批量预测后连续3</a>
                   <a href="#" class="list-group-item list-group-item-action" 
                       onclick="loadPage('pages/predconn.html?page=3')">批量预测后连续4</a>
                   <a href="#" class="list-group-item list-group-item-action" 
                       onclick="loadPage('pages/predconn.html?page=4')">批量预测后连续5</a>
                   <a href="#" class="list-group-item list-group-item-action" 
                       onclick="loadPage('pages/predconn.html?page=5')">批量预测后连续6</a>
                   <a href="#" class="list-group-item list-group-item-action" 
                       onclick="loadPage('pages/predconn.html?page=6')">批量预测后连续7</a>
                   <a href="#" class="list-group-item list-group-item-action" 
                       onclick="loadPage('pages/predconn.html?page=7')">批量预测后连续8</a>
                    <a href="#" class="list-group-item list-group-item-action" 
                       onclick="loadPage('pages/predconn.html?page=8')">批量预测后连续9</a>
                    <a href="#" class="list-group-item list-group-item-action" 
                       onclick="loadPage('pages/predconn.html?page=9')">批量预测后连续10</a>
                    <a href="#" class="list-group-item list-group-item-action" 
                       onclick="loadPage('pages/feature.html?feat=g13,g10&gte=10&lte=100')">特征13+10</a>
                    <a href="#" class="list-group-item list-group-item-action" 
                       onclick="loadPage('pages/feature.html?feat=g7,g4,g4&gte=1&lte=100')">特征7+4+4</a>
                    <a href="#" class="list-group-item list-group-item-action" 
                       onclick="loadPage('pages/feature.html?feat=g7,g4,g3&gte=1&lte=100')">特征7+4+3</a>
                    <a href="#" class="list-group-item list-group-item-action" 
                       onclick="loadPage('pages/feature.html?feat=cl2,l-21&gte=1&lte=100')">特征3+21&lt;3</a>

                       
                </div>
            </div>

            <!-- 主要内容 -->
            <div class="col-md-9 col-lg-10 main-content">
                <iframe id="contentFrame" src="pages/predict.html"></iframe>
            </div>
        </div>
    </div>

    <!-- 设置按钮 -->
    <div class="settings-btn" data-bs-toggle="modal" data-bs-target="#settingsModal">
        <i class="bi bi-gear-fill" style="font-size: 1.5rem;"></i>
    </div>

    <!-- 设置弹窗 -->
    <div class="modal fade settings-modal" id="settingsModal" tabindex="-1" aria-labelledby="settingsModalLabel" aria-hidden="true">
        <div class="modal-dialog">
            <div class="modal-content">
                <div class="modal-header">
                    <h5 class="modal-title" id="settingsModalLabel">系统设置</h5>
                    <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
                </div>
                <div class="modal-body">
                    <h6>提醒值设置</h6>
                    <div class="form-check">
                        <input class="form-check-input" type="checkbox" value="13" id="alertValue13">
                        <label class="form-check-label" for="alertValue13">13</label>
                    </div>
                    <div class="form-check">
                        <input class="form-check-input" type="checkbox" value="14" id="alertValue14">
                        <label class="form-check-label" for="alertValue14">14</label>
                    </div>
                    <div class="form-check">
                        <input class="form-check-input" type="checkbox" value="15" id="alertValue15">
                        <label class="form-check-label" for="alertValue15">15</label>
                    </div>
                    <div class="form-check">
                        <input class="form-check-input" type="checkbox" value="16" id="alertValue16">
                        <label class="form-check-label" for="alertValue16">16</label>
                    </div>
                    <div class="form-check">
                        <input class="form-check-input" type="checkbox" value="17" id="alertValue17">
                        <label class="form-check-label" for="alertValue17">17</label>
                    </div>
                    <div class="form-check">
                        <input class="form-check-input" type="checkbox" value="18" id="alertValue18">
                        <label class="form-check-label" for="alertValue18">18</label>
                    </div>
                    <div class="form-check">
                        <input class="form-check-input" type="checkbox" value="19" id="alertValue19">
                        <label class="form-check-label" for="alertValue19">19</label>
                    </div>
                    <div class="form-check">
                        <input class="form-check-input" type="checkbox" value="20" id="alertValue20">
                        <label class="form-check-label" for="alertValue20">20</label>
                    </div>
                </div>
                <div class="modal-footer">
                    <button type="button" class="btn btn-secondary" data-bs-dismiss="modal">关闭</button>
                    <button type="button" class="btn btn-primary" onclick="saveSettings()">保存设置</button>
                </div>
            </div>
        </div>
    </div>
  <!-- 弹窗结构 -->
  <div class="modal fade" id="exampleModal" tabindex="-1" aria-labelledby="exampleModalLabel" aria-hidden="true">
    <div class="modal-dialog">
      <div class="modal-content">
        <div class="modal-header">
          <h5 class="modal-title" id="exampleModalLabel">弹窗标题</h5>
          <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
        </div>
        <div class="modal-body" id="exampleModalBody">
          
        </div>
        <div class="modal-footer">
          <!--button type="button" class="btn btn-secondary" data-bs-dismiss="modal">关闭</button>
          <button type="button" class="btn btn-primary">保存更改</button-->
        </div>
      </div>
    </div>
  </div>


        <!-- 依赖脚本 -->
        <script src="/static/vendor/jquery/jquery.min.js"></script>
        <script src="/static/vendor/bootstrap/bootstrap.bundle.min.js"></script>
        <script src="/static/vendor/bootstrap-table/bootstrap-table.min.js"></script>

    <script src="/static/common/main.js"></script>
    <script> checkAuth() </script>

    
    <script>
    function loadPage(page, reactive=true) {
        document.getElementById('contentFrame').src = page;

        
        const items = document.querySelectorAll('.list-group-item');
            items.forEach(item => {
                item.classList.remove('active');
            });


        if (reactive) {
            // 更新活动菜单项
            
            event.target.classList.add('active');
        }

    }

    // 页面加载时读取设置
    window.onload = function() {
        loadSettings();
        // startAllTrend();
        
    };
    </script>
</body>
</html>